import {Component, Input, Output, EventEmitter, OnInit} from '@angular/core';
import {NzModalService} from 'ng-zorro-antd';

@Component({
  selector: 'app-endpoint-opt',
  styleUrls: ['rm-opt.component.css'],
  templateUrl: 'rm-opt.component.html',
})
export class ApmOptComponent implements OnInit {
  @Input() rowData: Element;
  @Output() del = new EventEmitter();


  // ------------------------------------------------------------------------------------------------------------------------

  showConfirm() {
    const _this = this;
    this.modalService.confirm({
      nzTitle: '您是否确认要删除这项内容',
      nzContent: '<b>删除操作无法回滚，请谨慎操作</b>',
      nzOnOk: () => {
        _this.del.emit();
      },
      nzOnCancel: () => {
      }
    });
  }

  constructor(private modalService: NzModalService) {
  }

  ngOnInit() {
  }
}
